Skip to main content

File

File is used to take a file as an input from the user. The file size and permissible extensions can be altered as per requirements.

File element can be used in various scenarios like:

  • Storing huge size data
  • Providing documents of different formats like images, excel, documents
  • Permitting limited extensions of file


Following is a screenshot of the File dialog element in its default state:

img alt

This dialog element can be customized using the following fields :

  • Execution: Configuration to decide when to execute the respective Dialog Element. The options are as follows,
    • Enabled: The Dialog Element will be executed everytime the dialog is executed.
    • Disabled: The Dialog Element will never be executed even if the dialog is executed.
    • Condition: Depending on certain condition, the Dialog Element is executed.
    info

    For a detailed explanation of Conditions, click here.

  • ID: It is a unique identifier for the file. It can be used to refer to the file later.
  • Message: The message displayed to the user while requesting for the file. E.g.: “Attach a scanned copy of your passport”.
  • Retry Message: In case the file uploaded by the user does not comply with the pre-defined list of permissible extensions or exceeds the file size limit, the chatbot will display this message. If the retry message is not specified, then the Message will be shown again.
  • State: The state in which the file attached by the user must be stored. Options are Dialog, Conversation, and User.
    info

    For detailed explanation on State click here

  • Size: It can be used to restrict the size of the file uploaded by the chatbot user. The limit must be set in kilobytes only.
  • Extensions: There are many different types of files available and each one has its own file extension. You can add a comma-separated list of acceptable file extensions here.
  • Max Attempts: Specify the maximum number of attempts allowed for user to enter a valid input. If this option is not specified, the default behavior allows the user to keep trying until a valid input is provided. When the user exceeds the maximum allowed invalid input attempts, the chatbot exits the current dialog, and the user needs to restart the conversation.

Following is a list of commonly used extensions for your reference:

ExtensionFile Type
.jpg, .jpeg, .pngImage
.pdfPortable Document Format File
.docxMicrosoft Word Document
.xlsx, .xlsMicrosoft Excel Workbook
.csvComma-Separated Values File
.zipCompressed File

The optional box ( img alt ) can be ticked to give the user the option to skip uploading a file. The user can skip the file input by typing a text message.